Skip to contentSkip to conversation

Change in openvpn[master]: t_client.sh: Do not wait 3 seconds for OpenVPN to come up

Openvpn-devel In review flichtenheld (Code Review) 2 participants 7 messages Aug 7, 2025 – Aug 8, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1754579268000.Ice8c7ff4d8118a9e6465a4724207a355138360b8@...2715...

#1 lore raw

Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1139?usp=email

to review the following change.

Change subject: t_client.sh: Do not wait 3 seconds for OpenVPN to come up
......................................................................

t_client.sh: Do not wait 3 seconds for OpenVPN to come up

On most machines 1 second should be quite enough. Given that we run currently 23 tests on most t_client runs, this makes over 40 seconds difference. Not nothing.

Change-Id Ice8c7ff4d8118a9e6465a4724207a355138360b8

---
M tests/t_client.sh.in

1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/39/1139/1

tests/t_client.sh.in +1 -1
index 7a271b6..1309ba1 100755
@@ -383,7 +383,7 @@
     ovpn_init_success=0
     while [ $ovpn_init_check -gt 0 ];
     do
-       sleep 3  # Wait for OpenVPN to initialize and have had time to write the pid file
+       sleep 1  # Wait for OpenVPN to initialize and have had time to write the pid file
        grep "Initialization Sequence Completed" $LOGDIR/$SUF:openvpn.log >/dev/null
        if [ $? -eq 0 ]; then
            ovpn_init_check=0

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1139?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ice8c7ff4d8118a9e6465a4724207a355138360b8
Gerrit-Change-Number: 1139
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to reexamine a change. Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1139?usp=email

to look at the new patch set (#2).

Change subject: t_client.sh: Do not wait 3 seconds for OpenVPN to come up
......................................................................

t_client.sh: Do not wait 3 seconds for OpenVPN to come up

On most machines 1 second should be quite enough. Given that we run currently 23 tests on most t_client runs, this makes over 40 seconds difference. Not nothing.

We keep the existing 30s maximum wait-time since sometimes we want to do tests with intentionally slow servers.

Change-Id Ice8c7ff4d8118a9e6465a4724207a355138360b8

---
M tests/t_client.sh.in

1 file changed, 3 insertions(+), 3 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/39/1139/2

tests/t_client.sh.in +3 -3
index 7a271b6..a49de40 100755
@@ -377,13 +377,13 @@
     $RUN_SUDO "${openvpn}" $openvpn_conf >>$LOGDIR/$SUF:openvpn.log &
     sudopid=$!
 
-    # Check if OpenVPN has initialized before continuing.  It will check every 3rd second up
+    # Check if OpenVPN has initialized before continuing.  It will check every second up
     # to $ovpn_init_check times.
-    ovpn_init_check=10
+    ovpn_init_check=30
     ovpn_init_success=0
     while [ $ovpn_init_check -gt 0 ];
     do
-       sleep 3  # Wait for OpenVPN to initialize and have had time to write the pid file
+       sleep 1  # Wait for OpenVPN to initialize and have had time to write the pid file
        grep "Initialization Sequence Completed" $LOGDIR/$SUF:openvpn.log >/dev/null
        if [ $? -eq 0 ]; then
            ovpn_init_check=0

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1139?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ice8c7ff4d8118a9e6465a4724207a355138360b8
Gerrit-Change-Number: 1139
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newpatchset

#3 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld, plaisthos.

cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/1139?usp=email )

Change subject: t_client.sh: Do not wait 3 seconds for OpenVPN to come up
......................................................................

Patch Set 2: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1139?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ice8c7ff4d8118a9e6465a4724207a355138360b8
Gerrit-Change-Number: 1139
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Thu, 07 Aug 2025 20:37:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

#4 lore raw

PATCH v2 1/1 t_client.sh: Do not wait 3 seconds for OpenVPN to come up

In reply to a message not in the archive

From: Frank Lichtenheld <[email protected]...>

On most machines 1 second should be quite enough. Given that we run currently 23 tests on most t_client runs, this makes over 40 seconds difference. Not nothing.

We keep the existing 30s maximum wait-time since sometimes we want to do tests with intentionally slow servers.

Change-Id Ice8c7ff4d8118a9e6465a4724207a355138360b8

---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1139
This mail reflects revision 2 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>

tests/t_client.sh.in +3 -3
index 7a271b6..a49de40 100755
@@ -377,13 +377,13 @@
     $RUN_SUDO "${openvpn}" $openvpn_conf >>$LOGDIR/$SUF:openvpn.log &
     sudopid=$!
 
-    # Check if OpenVPN has initialized before continuing.  It will check every 3rd second up
+    # Check if OpenVPN has initialized before continuing.  It will check every second up
     # to $ovpn_init_check times.
-    ovpn_init_check=10
+    ovpn_init_check=30
     ovpn_init_success=0
     while [ $ovpn_init_check -gt 0 ];
     do
-       sleep 3  # Wait for OpenVPN to initialize and have had time to write the pid file
+       sleep 1  # Wait for OpenVPN to initialize and have had time to write the pid file
        grep "Initialization Sequence Completed" $LOGDIR/$SUF:openvpn.log >/dev/null
        if [ $? -eq 0 ]; then
            ovpn_init_check=0
#5 lore raw

[Openvpn-devel] [PATCH applied] Re: t_client.sh: Do not wait 3 seconds for OpenVPN to come up

"Because it makes sense" :-) - lightly tested on Linux, heavily tested by the buildbots.

Your patch has been applied to the master branch.

commit db1fd1a80baa9e44df8ae82f0fd2b56c59195484

Author: Frank Lichtenheld
Date:   Thu Aug 7 22:37:35 2025 +0200
     t_client.sh: Do not wait 3 seconds for OpenVPN to come up

     Signed-off-by: Frank Lichtenheld <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg32585.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#6 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#3) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1139?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by cron2

Change subject: t_client.sh: Do not wait 3 seconds for OpenVPN to come up
......................................................................

t_client.sh: Do not wait 3 seconds for OpenVPN to come up

On most machines 1 second should be quite enough. Given that we run currently 23 tests on most t_client runs, this makes over 40 seconds difference. Not nothing.

We keep the existing 30s maximum wait-time since sometimes we want to do tests with intentionally slow servers.

Change-Id Ice8c7ff4d8118a9e6465a4724207a355138360b8

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32585.html

---
M tests/t_client.sh.in

1 file changed, 3 insertions(+), 3 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/39/1139/3

tests/t_client.sh.in +3 -3
index 7a271b6..a49de40 100755
@@ -377,13 +377,13 @@
     $RUN_SUDO "${openvpn}" $openvpn_conf >>$LOGDIR/$SUF:openvpn.log &
     sudopid=$!
 
-    # Check if OpenVPN has initialized before continuing.  It will check every 3rd second up
+    # Check if OpenVPN has initialized before continuing.  It will check every second up
     # to $ovpn_init_check times.
-    ovpn_init_check=10
+    ovpn_init_check=30
     ovpn_init_success=0
     while [ $ovpn_init_check -gt 0 ];
     do
-       sleep 3  # Wait for OpenVPN to initialize and have had time to write the pid file
+       sleep 1  # Wait for OpenVPN to initialize and have had time to write the pid file
        grep "Initialization Sequence Completed" $LOGDIR/$SUF:openvpn.log >/dev/null
        if [ $? -eq 0 ]; then
            ovpn_init_check=0

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1139?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ice8c7ff4d8118a9e6465a4724207a355138360b8
Gerrit-Change-Number: 1139
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset

#7 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1139?usp=email )

Change subject: t_client.sh: Do not wait 3 seconds for OpenVPN to come up
......................................................................

t_client.sh: Do not wait 3 seconds for OpenVPN to come up

On most machines 1 second should be quite enough. Given that we run currently 23 tests on most t_client runs, this makes over 40 seconds difference. Not nothing.

We keep the existing 30s maximum wait-time since sometimes we want to do tests with intentionally slow servers.

Change-Id Ice8c7ff4d8118a9e6465a4724207a355138360b8

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg32585.html

---
M tests/t_client.sh.in

1 file changed, 3 insertions(+), 3 deletions(-)
tests/t_client.sh.in +3 -3
index 7a271b6..a49de40 100755
@@ -377,13 +377,13 @@
     $RUN_SUDO "${openvpn}" $openvpn_conf >>$LOGDIR/$SUF:openvpn.log &
     sudopid=$!
 
-    # Check if OpenVPN has initialized before continuing.  It will check every 3rd second up
+    # Check if OpenVPN has initialized before continuing.  It will check every second up
     # to $ovpn_init_check times.
-    ovpn_init_check=10
+    ovpn_init_check=30
     ovpn_init_success=0
     while [ $ovpn_init_check -gt 0 ];
     do
-       sleep 3  # Wait for OpenVPN to initialize and have had time to write the pid file
+       sleep 1  # Wait for OpenVPN to initialize and have had time to write the pid file
        grep "Initialization Sequence Completed" $LOGDIR/$SUF:openvpn.log >/dev/null
        if [ $? -eq 0 ]; then
            ovpn_init_check=0

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1139?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ice8c7ff4d8118a9e6465a4724207a355138360b8
Gerrit-Change-Number: 1139
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged